Counting substring occurrences in string[]
Posted
by shaon-fan
on Stack Overflow
See other posts from Stack Overflow
or by shaon-fan
Published on 2010-04-21T12:53:12Z
Indexed on
2010/04/21
13:03 UTC
Read the original article
Hit count: 128
c#
Given a String array such as this:
string[]={"bmw"," ","1bmw"," "};
I need to count how often the substring bmw
occurs in that array. In this example it occurs 2 times.
How do I write that in C#?
© Stack Overflow or respective owner